<%--
  Created by IntelliJ IDEA.
  User: ThinkPad
  Date: 2021/12/7
  Time: 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div class="personal-left f-l">
    <div class="personal-l-tit">
        <h3>个人中心</h3>
    </div>
    <ul>
        <li class="per-li2"><a href="/SheepShoppingMall/frontEnd/personData.jsp?currentIndex=1">个人资料<span>></span></a></li>
        <li class="per-li3"><a href="#">我的订单<span>></span></a></li>
        <li class="per-li4"><a href="#">我的预约<span>></span></a></li>
        <li class="per-li5"><a href="#">购物车<span>></span></a></li>
        <li class="per-li6"><a href="#">管理收货地址<span>></span></a></li>
        <li class="per-li7"><a href="/SheepShoppingMall/frontEnd/collectionList.jsp?currentIndex=6">商品收藏<span>></span></a></li>
        <li class="per-li8"><a href="#">购买记录<span>></span></a></li>
        <li class="per-li9"><a href="#">浏览记录<span>></span></a></li>
        <li class="per-li10"><a href="#">会员积分<span>></span></a></li>
    </ul>
    <script src="js/jquery.js"></script>
    <script>
        $(function () {

        })

        window.onload =function(){
            let index = 1
            const lis = $('li[class^=per-li]')
            $('li[class^=per-li]').removeClass()
            lis.each(function () {
                $(this).addClass('per-li' + ++index)
                if (index == ${param.currentIndex}+1) {
                    $(this).addClass('current-li')
                }
            })
        }
        <c:if test="${user==null}">
            alert('您还未登录，请登录再试！！！')
            location.href='login.jsp'
        </c:if>
    </script>
</div>
</body>
</html>
